home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / showhi1a / form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-07-22  |  1.5 KB  |  49 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   3195
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   4680
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3195
  10.    ScaleWidth      =   4680
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton Command2 
  13.       Caption         =   "Show the task bar"
  14.       Height          =   525
  15.       Left            =   1770
  16.       TabIndex        =   1
  17.       Top             =   1950
  18.       Width           =   1245
  19.    End
  20.    Begin VB.CommandButton Command1 
  21.       Caption         =   "Hide the Taskbar"
  22.       Height          =   525
  23.       Left            =   1710
  24.       TabIndex        =   0
  25.       Top             =   900
  26.       Width           =   1245
  27.    End
  28. Attribute VB_Name = "Form1"
  29. Attribute VB_GlobalNameSpace = False
  30. Attribute VB_Creatable = False
  31. Attribute VB_PredeclaredId = True
  32. Attribute VB_Exposed = False
  33. Option Explicit
  34. Private Sub Command1_Click()
  35.     Dim hwnd As Long
  36.     hwnd = FindWindow("Shell_traywnd", "")
  37.     Call SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
  38. End Sub
  39. Private Sub Command2_Click()
  40.     Dim hwnd As Long
  41.     hwnd = FindWindow("Shell_traywnd", "")
  42.     Call SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
  43. End Sub
  44. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  45.     Dim hwnd As Long
  46.     hwnd = FindWindow("Shell_traywnd", "")
  47.     Call SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
  48. End Sub
  49.